[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
DrawPoly procedure
DECLARATION: DrawPoly(NumPoints : Word; var PolyPoints);
PURPOSE: Draws the outline of a polygon using the current
line style and color.
UNIT: Graph
REMARKS: PolyPoints is an untyped parameter containing the
coordinates of each intersection in the polygon.
NumPoints contains the number of coordinates in PolyPoints
A coordinate consists of two words, an X and a Y value.
DrawPoly uses the current line style and color.
Use SetWriteMode to determine whether the polygon copied
to or XOR'd to the screen.
RESTRICTIONS: Must first be in graphics mode.
EXAMPLE: Uses
GRAPH;
Const
Triangle: Array[1..4] of PointType = ((x: 50; y: 100),
(x: 100; y: 100),
(x: 150; y: 150),
(x: 50; y: 100));
Var
Gd, Gm: Integer;
Begin
Gd := Detect;
InitGraph(Gd, Gm, '');
If GraphResult <> grOK Then
Halt(1);
DrawPoly(SizeOf(Triangle) div SizeOf(PointType),Triangle);
ReadLn;
CloseGraph;
End.
See Also:
FillPoly
GetLineSettings
SetColor
SetLineStyle
GraphResult
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson